package net.lainiao.morethread.Chapter2.demo5;

/**
 * Created by Administrator on 2017/2/28.
 */
public class Reader implements Runnable {
    private PriceInfo priceInfo;
    public Reader(PriceInfo priceInfo){
        this.priceInfo=priceInfo;
    }
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println("Price1:"+Thread.currentThread().getName()+" value="+priceInfo.getPrice1());
            System.out.println("Price2:"+Thread.currentThread().getName()+" value="+priceInfo.getPrice2());
        }
    }
}
